%plotfivemetals50.m
% is called from DASOV24.m


lab={'GO-low'; 'SI-low'; 'PL-low'; 'CO-low'; 'NI-low';'GO-high'; 'SI-high'; 'PL-high'; 'CO-high'; 'NI-high'};
figure(3)

% 50 cutoffs for 10 Year: monthly and then annual
slom(1) = table2array(TGold10Y    (3,2));
slom(2) = table2array(TSilver10Y  (3,2));
slom(3) = table2array(TPlatinum10Y(3,2));
slom(4) = table2array(TCopper10Y  (3,2));
slom(5) = table2array(TNickel10Y  (3,2));

rsqm(1) = table2array(TGold10Y    (4,2));
rsqm(2) = table2array(TSilver10Y  (4,2));
rsqm(3) = table2array(TPlatinum10Y(4,2));
rsqm(4) = table2array(TCopper10Y  (4,2));
rsqm(5) = table2array(TNickel10Y  (4,2));

slom(6) = table2array(TGold10Y    (3,4));
slom(7) = table2array(TSilver10Y  (3,4));
slom(8) = table2array(TPlatinum10Y(3,4));
slom(9) = table2array(TCopper10Y  (3,4));
slom(10) = table2array(TNickel10Y (3,4));

rsqm(6) = table2array(TGold10Y    (4,4));
rsqm(7) = table2array(TSilver10Y  (4,4));
rsqm(8) = table2array(TPlatinum10Y(4,4));
rsqm(9) = table2array(TCopper10Y  (4,4));
rsqm(10) = table2array(TNickel10Y (4,4));


subplot(1,2,1)
scatter(slom,rsqm,'red','filled')
xlabel('Slope')
ylabel('R-squared')
text(slom+.07,rsqm,lab)
title('50% cutoff for low and high 10Y yields, monthly')
grid

sloa(1) = table2array(TGold10Y    (7,2));
sloa(2) = table2array(TSilver10Y  (7,2));
sloa(3) = table2array(TPlatinum10Y(7,2));
sloa(4) = table2array(TCopper10Y  (7,2));
sloa(5) = table2array(TNickel10Y  (7,2));

rsqa(1) = table2array(TGold10Y    (8,2));
rsqa(2) = table2array(TSilver10Y  (8,2));
rsqa(3) = table2array(TPlatinum10Y(8,2));
rsqa(4) = table2array(TCopper10Y  (8,2));
rsqa(5) = table2array(TNickel10Y  (8,2));

sloa(6) = table2array(TGold10Y    (7,4));
sloa(7) = table2array(TSilver10Y  (7,4));
sloa(8) = table2array(TPlatinum10Y(7,4));
sloa(9) = table2array(TCopper10Y  (7,4));
sloa(10) = table2array(TNickel10Y (7,4));

rsqa(6) = table2array(TGold10Y    (8,4));
rsqa(7) = table2array(TSilver10Y  (8,4));
rsqa(8) = table2array(TPlatinum10Y(8,4));
rsqa(9) = table2array(TCopper10Y  (8,4));
rsqa(10) = table2array(TNickel10Y (8,4));

subplot(1,2,2)
scatter(sloa,rsqa,'red','filled')
xlabel('Slope')
ylabel('R-squared')
text(sloa+.15,rsqa,lab)
title('50% cutoff for low and high 10Y yields, annual')
grid


